<!-- src/views/Login.vue -->
<template>
  <div >
      <input type="text" v-model="username" placeholder="Username">
      <input type="password" v-model="password" placeholder="Password">
      <button @click="login">Login</button>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        username:'',
        password:''
      }
    },
    methods:{
      login(){
         this.$auth.login(this.username,this.password)
         console.log("进入subjects")
         this.$router.push('/subjects')
       }
    }
}
</script>
